Optimal. Leaf size=58 \[ \frac{a \cos ^3(c+d x)}{3 d}-\frac{a \cos (c+d x)}{d}+\frac{b \cos ^2(c+d x)}{2 d}-\frac{b \log (\cos (c+d x))}{d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0857308, antiderivative size = 58, normalized size of antiderivative = 1., number of steps used = 5, number of rules used = 4, integrand size = 19, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.21, Rules used = {3872, 2837, 12, 766} \[ \frac{a \cos ^3(c+d x)}{3 d}-\frac{a \cos (c+d x)}{d}+\frac{b \cos ^2(c+d x)}{2 d}-\frac{b \log (\cos (c+d x))}{d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3872
Rule 2837
Rule 12
Rule 766
Rubi steps
\begin{align*} \int (a+b \sec (c+d x)) \sin ^3(c+d x) \, dx &=-\int (-b-a \cos (c+d x)) \sin ^2(c+d x) \tan (c+d x) \, dx\\ &=\frac{\operatorname{Subst}\left (\int \frac{a (-b+x) \left (a^2-x^2\right )}{x} \, dx,x,-a \cos (c+d x)\right )}{a^3 d}\\ &=\frac{\operatorname{Subst}\left (\int \frac{(-b+x) \left (a^2-x^2\right )}{x} \, dx,x,-a \cos (c+d x)\right )}{a^2 d}\\ &=\frac{\operatorname{Subst}\left (\int \left (a^2-\frac{a^2 b}{x}+b x-x^2\right ) \, dx,x,-a \cos (c+d x)\right )}{a^2 d}\\ &=-\frac{a \cos (c+d x)}{d}+\frac{b \cos ^2(c+d x)}{2 d}+\frac{a \cos ^3(c+d x)}{3 d}-\frac{b \log (\cos (c+d x))}{d}\\ \end{align*}
Mathematica [A] time = 0.0453399, size = 57, normalized size = 0.98 \[ -\frac{3 a \cos (c+d x)}{4 d}+\frac{a \cos (3 (c+d x))}{12 d}-\frac{b \left (\log (\cos (c+d x))-\frac{1}{2} \cos ^2(c+d x)\right )}{d} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.033, size = 61, normalized size = 1.1 \begin{align*} -{\frac{a\cos \left ( dx+c \right ) \left ( \sin \left ( dx+c \right ) \right ) ^{2}}{3\,d}}-{\frac{2\,a\cos \left ( dx+c \right ) }{3\,d}}-{\frac{b \left ( \sin \left ( dx+c \right ) \right ) ^{2}}{2\,d}}-{\frac{b\ln \left ( \cos \left ( dx+c \right ) \right ) }{d}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 0.952518, size = 63, normalized size = 1.09 \begin{align*} \frac{2 \, a \cos \left (d x + c\right )^{3} + 3 \, b \cos \left (d x + c\right )^{2} - 6 \, a \cos \left (d x + c\right ) - 6 \, b \log \left (\cos \left (d x + c\right )\right )}{6 \, d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 1.78341, size = 126, normalized size = 2.17 \begin{align*} \frac{2 \, a \cos \left (d x + c\right )^{3} + 3 \, b \cos \left (d x + c\right )^{2} - 6 \, a \cos \left (d x + c\right ) - 6 \, b \log \left (-\cos \left (d x + c\right )\right )}{6 \, d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \left (a + b \sec{\left (c + d x \right )}\right ) \sin ^{3}{\left (c + d x \right )}\, dx \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.31767, size = 89, normalized size = 1.53 \begin{align*} -\frac{b \log \left (\frac{{\left | \cos \left (d x + c\right ) \right |}}{{\left | d \right |}}\right )}{d} + \frac{2 \, a d^{2} \cos \left (d x + c\right )^{3} + 3 \, b d^{2} \cos \left (d x + c\right )^{2} - 6 \, a d^{2} \cos \left (d x + c\right )}{6 \, d^{3}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]